home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / asmgen3.arc / MASM2COM.BAT < prev   
DOS Batch File  |  1989-04-19  |  1KB  |  46 lines

  1. echo off
  2. cls
  3. echo   MASM2COM.BAT - Assemble a source file, link, convert to a .COM file.
  4. echo  
  5. timemark start /n
  6. if %1! == ! goto oops1
  7. if exist %1 goto oops2
  8. echo Assemble %1.ASM to create %1.OBJ
  9. masm %1,%1,%1;
  10. if errorlevel == 1 goto error
  11. echo Link %1.OBJ to create %1.EXE
  12. link %1 ;
  13. echo LINK normally issues a missing STACK segment warning here.
  14. echo  
  15. del %1.COM
  16. echo Attempt to convert %1.EXE to %1.COM
  17. exe2bin %1 %1.com
  18. if not exist %1.com goto end
  19. del %1.obj
  20. del %1.exe
  21. echo %1.COM was created, the %1.OBJ and %1.EXE files were deleted.
  22. goto end
  23. :error
  24. echo -- Assembly error, %1.OBJ not created, see %1.LST for errors. --
  25. goto end2
  26. :oops2
  27. echo         -- The filename %1 exists as entered. --
  28. goto end2
  29. :oops1
  30. echo         -- No source filename was entered. --
  31. :end2
  32. echo  
  33. echo     ╔════════════════════════════════════════════════════════════════╗
  34. echo     ║ The assembly source file name MUST have a .ASM extension.      ║
  35. echo     ║ The .ASM extension MUST NOT be entered with the file name.     ║
  36. echo     ║ A file with the same name and no extension will show as error. ║
  37. echo     ║ The usage is: MASM2COM filename                                ║
  38. echo     ╚════════════════════════════════════════════════════════════════╝
  39. :end
  40. echo  
  41. echo  
  42. echo  
  43. echo  
  44. timemark stop /n /l
  45. echo  
  46.